home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / T / Think-Pascal-7.0.cpt / THINK Pascal Interfaces / AppleTalk.p < prev    next >
Encoding:
Text File  |  1991-04-03  |  29.8 KB  |  568 lines  |  [TEXT/PJMM]

  1. {    This file has been processed by The THINK Pascal Source Converter, v1.1.    }
  2.  
  3. {
  4. Created: Sunday, January 6, 1991 at 10:20 PM
  5.     AppleTalk.p
  6.     Pascal Interface to the Macintosh Libraries
  7.  
  8.         Copyright Apple Computer, Inc. 1985-1990
  9.         All rights reserved
  10. }
  11.  
  12.  
  13. {$IFC UNDEFINED UsingIncludes}
  14. {$SETC UsingIncludes := 0}
  15. {$ENDC}
  16.  
  17.  
  18.     UNIT AppleTalk;
  19.     INTERFACE USES    Types,OSUtils;
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36. CONST
  37.  
  38. {    Driver unit and reference numbers (ADSP is dynamic)}
  39.  
  40. mppUnitNum = 9;                                                 {MPP unit number}
  41. atpUnitNum = 10;                                                { ATP unit number }
  42. xppUnitNum = 40;                                                { XPP unit number }
  43. mppRefNum = -10;                                                {MPP reference number }
  44. atpRefNum = -11;                                                { ATP reference number }
  45. xppRefNum = -41;                                                { XPP reference number }
  46.  
  47. {    .MPP csCodes}
  48.  
  49. lookupReply = 242;                                              { This command queued to ourself }
  50. writeLAP = 243;                                                 { Write out LAP packet }
  51. detachPH = 244;                                                 { Detach LAP protocol handler }
  52. attachPH = 245;                                                 { Attach LAP protocol handler }
  53. writeDDP = 246;                                                 { Write out DDP packet }
  54. closeSkt = 247;                                                 { Close DDP socket }
  55. openSkt = 248;                                                  { Open DDP socket }
  56. loadNBP = 249;                                                  { Load NBP command-executing code }
  57. lastResident = 249;                                             { Last resident command }
  58. confirmName = 250;                                              { Confirm name }
  59. lookupName = 251;                                               { Look up name on internet }
  60. removeName = 252;                                               { Remove name from Names Table }
  61. registerName = 253;                                             { Register name in Names Table }
  62. killNBP = 254;                                                  { Kill outstanding NBP request }
  63. unloadNBP = 255;                                                { Unload NBP command code }
  64. setSelfSend = 256;                                              { MPP: Set to allow writes to self }
  65. SetMyZone = 257;                                                { Set my zone name }
  66. GetATalkInfo = 258;                                             { get AppleTalk information }
  67. ATalkClosePrep = 259;                                           { AppleTalk close query }
  68.  
  69. {    .ATP csCodes}
  70.  
  71. nSendRequest = 248;                                             { NSendRequest code }
  72. relRspCB = 249;                                                 { Release RspCB }
  73. closeATPSkt = 250;                                              { Close ATP socket }
  74. addResponse = 251;                                              { Add response code | Require open skt }
  75. sendResponse = 252;                                             { Send response code }
  76. getRequest = 253;                                               { Get request code }
  77. openATPSkt = 254;                                               { Open ATP socket }
  78. sendRequest = 255;                                              { Send request code }
  79. relTCB = 256;                                                   { Release TCB }
  80. killGetReq = 257;                                               { Kill GetRequest }
  81. killSendReq = 258;                                              { Kill SendRequest }
  82. killAllGetReq = 259;                                            { Kill all getRequests for a skt }
  83.  
  84. {    .XPP csCodes}
  85.  
  86. openSess = 255;                                                 { Open session }
  87. closeSess = 254;                                                { Close session }
  88. userCommand = 253;                                              { User command }
  89. userWrite = 252;                                                { User write }
  90. getStatus = 251;                                                { Get status }
  91. afpCall = 250;                                                  { AFP command (buffer has command code) }
  92. getParms = 249;                                                 { Get parameters }
  93. abortOS = 248;                                                  { Abort open session request }
  94. closeAll = 247;                                                 { Close all open sessions }
  95. xCall = 246;                                                    { .XPP extended calls }
  96. ATTransOpen = 0;                                                {AppleTalk has opened}
  97. ATTransClose = 2;                                               {AppleTalk is about to close}
  98. ATTransClosePrep = 3;                                           {Is it OK to close AppleTalk ?}
  99. ATTransCancelClose = 4;                                         {Cancel the ClosePrep transition}
  100. afpByteRangeLock = 1;                                           {AFPCall command codes}
  101. afpVolClose = 2;                                                {AFPCall command codes}
  102. afpDirClose = 3;                                                {AFPCall command codes}
  103. afpForkClose = 4;                                               {AFPCall command codes}
  104. afpCopyFile = 5;                                                {AFPCall command codes}
  105. afpDirCreate = 6;                                               {AFPCall command codes}
  106. afpFileCreate = 7;                                              {AFPCall command codes}
  107. afpDelete = 8;                                                  {AFPCall command codes}
  108. afpEnumerate = 9;                                               {AFPCall command codes}
  109. afpFlush = 10;                                                  {AFPCall command codes}
  110. afpForkFlush = 11;                                              {AFPCall command codes}
  111. afpGetDirParms = 12;                                            {AFPCall command codes}
  112. afpGetFileParms = 13;                                           {AFPCall command codes}
  113. afpGetForkParms = 14;                                           {AFPCall command codes}
  114. afpGetSInfo = 15;                                               {AFPCall command codes}
  115. afpGetSParms = 16;                                              {AFPCall command codes}
  116. afpGetVolParms = 17;                                            {AFPCall command codes}
  117. afpLogin = 18;                                                  {AFPCall command codes}
  118. afpContLogin = 19;                                              {AFPCall command codes}
  119. afpLogout = 20;                                                 {AFPCall command codes}
  120. afpMapID = 21;                                                  {AFPCall command codes}
  121. afpMapName = 22;                                                {AFPCall command codes}
  122. afpMove = 23;                                                   {AFPCall command codes}
  123. afpOpenVol = 24;                                                {AFPCall command codes}
  124. afpOpenDir = 25;                                                {AFPCall command codes}
  125. afpOpenFork = 26;                                               {AFPCall command codes}
  126. afpRead = 27;                                                   {AFPCall command codes}
  127. afpRename = 28;                                                 {AFPCall command codes}
  128. afpSetDirParms = 29;                                            {AFPCall command codes}
  129. afpSetFileParms = 30;                                           {AFPCall command codes}
  130. afpSetForkParms = 31;                                           {AFPCall command codes}
  131. afpSetVolParms = 32;                                            {AFPCall command codes}
  132. afpWrite = 33;                                                  {AFPCall command codes}
  133. afpGetFlDrParms = 34;                                           {AFPCall command codes}
  134. afpSetFlDrParms = 35;                                           {AFPCall command codes}
  135. afpDTOpen = 48;                                                 {AFPCall command codes}
  136. afpDTClose = 49;                                                {AFPCall command codes}
  137. afpGetIcon = 51;                                                {AFPCall command codes}
  138. afpGtIcnInfo = 52;                                              {AFPCall command codes}
  139. afpAddAPPL = 53;                                                {AFPCall command codes}
  140. afpRmvAPPL = 54;                                                {AFPCall command codes}
  141. afpGetAPPL = 55;                                                {AFPCall command codes}
  142. afpAddCmt = 56;                                                 {AFPCall command codes}
  143. afpRmvCmt = 57;                                                 {AFPCall command codes}
  144. afpGetCmt = 58;                                                 {AFPCall command codes}
  145. afpAddIcon = 192;                                               {Special code for ASP Write commands}
  146.  
  147. xppLoadedBit = 5;                                               { XPP bit in PortBUse }
  148. scbMemSize = 192;                                               {Size of memory for SCB }
  149. xppFlagClr = 0;                                                 {Cs for AFPCommandBlock }
  150. xppFlagSet = 128;                                               {StartEndFlag & NewLineFlag fields. }
  151.  
  152. lapSize = 20;
  153. ddpSize = 26;
  154. nbpSize = 26;
  155. atpSize = 56;
  156. atpXOvalue = 32;                                                {ATP exactly-once bit }
  157. atpEOMvalue = 16;                                               {ATP End-Of-Message bit }
  158. atpSTSvalue = 8;                                                {ATP Send-Transmission-Status bit }
  159. atpTIDValidvalue = 2;                                           {ATP trans. ID valid bit }
  160. atpSendChkvalue = 1;                                            {ATP send checksum bit }
  161.  
  162. zipGetLocalZones = 5;
  163. zipGetZoneList = 6;
  164. zipGetMyZone = 7;
  165.  
  166. LAPMgrPtr = $B18;                                               {Entry point for LAP Manager}
  167. LAPMgrCall = 2;                                                 {Offset to LAP routines}
  168. LAddAEQ = 23;                                                   {LAPAddATQ routine selector}
  169. LRmvAEQ = 24;                                                   {LAPRmvATQ routine selector}
  170.  
  171. TYPE
  172. ABCallType = (tLAPRead,tLAPWrite,tDDPRead,tDDPWrite,tNBPLookup,tNBPConfirm,
  173.     tNBPRegister,tATPSndRequest,tATPGetRequest,tATPSdRsp,tATPAddRsp,tATPRequest,
  174.     tATPResponse);
  175.  
  176. ABProtoType = (lapProto,ddpProto,nbpProto,atpProto);
  177.  
  178.  
  179. ABByte=1..127;
  180.  
  181. LAPAdrBlock = PACKED RECORD
  182.     dstNodeID: Byte;
  183.     srcNodeID: Byte;
  184.     lapProtType: ABByte;
  185.     END;
  186.  
  187. ATQEntryPtr = ^ATQEntry;
  188. ATQEntry = RECORD
  189.     qLink: ATQEntryPtr;                                         {next queue entry}
  190.     qType: INTEGER;                                             {queue type}
  191.     CallAddr: ProcPtr;                                          {pointer to your routine}
  192.     END;
  193.  
  194. AddrBlock = PACKED RECORD
  195.     aNet: INTEGER;
  196.     aNode: Byte;
  197.     aSocket: Byte;
  198.     END;
  199.  
  200. EntityPtr = ^EntityName;
  201. EntityName = RECORD
  202.     objStr: Str32;
  203.     typeStr: Str32;
  204.     zoneStr: Str32;
  205.     END;
  206.  
  207. RetransType = PACKED RECORD
  208.     retransInterval: Byte;
  209.     retransCount: Byte;
  210.     END;
  211.  
  212. BDSElement = RECORD
  213.     buffSize: INTEGER;
  214.     buffPtr: Ptr;
  215.     dataSize: INTEGER;
  216.     userBytes: LONGINT;
  217.     END;
  218.  
  219.  
  220. BDSType = ARRAY [0..7] OF BDSElement;
  221. BDSPtr = ^BDSType;
  222. BitMapType = PACKED ARRAY [0..7] OF BOOLEAN;
  223.  
  224. ABRecPtr = ^ABusRecord;
  225. ABRecHandle = ^ABRecPtr;
  226. ABusRecord = RECORD
  227.     abOpcode: ABCallType;
  228.     abResult: INTEGER;
  229.     abUserReference: LONGINT;
  230.     CASE ABProtoType OF
  231.       lapProto:
  232.         (lapAddress: LAPAdrBlock;
  233.         lapReqCount: INTEGER;
  234.         lapActCount: INTEGER;
  235.         lapDataPtr: Ptr);
  236.       ddpProto:
  237.         (ddpType: Byte;
  238.         ddpSocket: Byte;
  239.         ddpAddress: AddrBlock;
  240.         ddpReqCount: INTEGER;
  241.         ddpActCount: INTEGER;
  242.         ddpDataPtr: Ptr;
  243.         ddpNodeID: Byte);
  244.       nbpProto:
  245.         (nbpEntityPtr: EntityPtr;
  246.         nbpBufPtr: Ptr;
  247.         nbpBufSize: INTEGER;
  248.         nbpDataField: INTEGER;
  249.         nbpAddress: AddrBlock;
  250.         nbpRetransmitInfo: RetransType);
  251.       atpProto:
  252.         (atpSocket: Byte;
  253.         atpAddress: AddrBlock;
  254.         atpReqCount: INTEGER;
  255.         atpDataPtr: Ptr;
  256.         atpRspBDSPtr: BDSPtr;
  257.         atpBitmap: BitMapType;
  258.         atpTransID: INTEGER;
  259.         atpActCount: INTEGER;
  260.         atpUserData: LONGINT;
  261.         atpXO: BOOLEAN;
  262.         atpEOM: BOOLEAN;
  263.         atpTimeOut: Byte;
  264.         atpRetries: Byte;
  265.         atpNumBufs: Byte;
  266.         atpNumRsp: Byte;
  267.         atpBDSSize: Byte;
  268.         atpRspUData: LONGINT;
  269.         atpRspBuf: Ptr;
  270.         atpRspSize: INTEGER);
  271.     END;
  272.  
  273. AFPCommandBlock = PACKED RECORD
  274.     cmdByte: Byte;
  275.     startEndFlag: Byte;
  276.     forkRefNum: INTEGER;
  277.     rwOffset: LONGINT;
  278.     reqCount: LONGINT;
  279.     newLineFlag: Byte;
  280.     newLineChar: CHAR;
  281.     END;
  282.  
  283. WDSElement = RECORD
  284.     entryLength: INTEGER;
  285.     entryPtr: Ptr;
  286.     END;
  287.  
  288. NamesTableEntry = RECORD
  289.     qLink: QElemPtr;
  290.     nteAddress: AddrBlock;
  291.     nteData: PACKED ARRAY [1..100] OF CHAR;
  292.     END;
  293.  
  294. MPPParmType = (LAPWriteParm,AttachPHParm,DetachPHParm,OpenSktParm,CloseSktParm,
  295.     WriteDDPParm,OpenATPSktParm,CloseATPSktParm,SendRequestParm,GetRequestParm,
  296.     SendResponseParm,AddResponseParm,RelTCBParm,RelRspCBParm,RegisterNameParm,
  297.     LookupNameParm,ConfirmNameParm,RemoveNameParm,SetSelfSendParm,NSendRequestParm,
  298.     KillSendReqParm,KillGetReqParm,KillNBPParm,GetAppleTalkInfoParm,KillAllGetReqParm,
  299.     ATalkClosePrepParm,CancelATalkClosePrepParm);
  300.  
  301. MPPPBPtr = ^MPPParamBlock;
  302. MPPParamBlock = PACKED RECORD
  303.     qLink: QElemPtr;                                            {next queue entry}
  304.     qType: INTEGER;                                             {queue type}
  305.     ioTrap: INTEGER;                                            {routine trap}
  306.     ioCmdAddr: Ptr;                                             {routine address}
  307.     ioCompletion: ProcPtr;                                      {completion routine}
  308.     ioResult: OSErr;                                            {result code}
  309.     ioNamePtr: StringPtr;                                       {->filename}
  310.     ioVRefNum: INTEGER;                                         {volume reference or drive number}
  311.     ioRefNum: INTEGER;                                          {driver reference number}
  312.     csCode: INTEGER;                                            {call command code AUTOMATICALLY set}
  313.     CASE MPPParmType OF
  314.       LAPWriteParm:
  315.         (filler0: INTEGER;
  316.         wdsPointer: Ptr);                                       {->Write Data Structure}
  317.       AttachPHParm,DetachPHParm:
  318.         (protType: Byte;                                        {ALAP Protocol Type}
  319.         filler1: Byte;
  320.         handler: Ptr);                                          {->protocol handler routine}
  321.       OpenSktParm,CloseSktParm,WriteDDPParm:
  322.         (socket: Byte;                                          {socket number}
  323.         checksumFlag: Byte;                                     {checksum flag}
  324.         listener: Ptr);                                         {->socket listener routine}
  325.       RegisterNameParm,LookupNameParm,ConfirmNameParm,RemoveNameParm:
  326.         (interval: Byte;                                        {retry interval}
  327.         count: Byte;                                            {retry count}
  328.         entityPtr: Ptr;                                         {->names table element or ->entity name}
  329.         CASE MPPParmType OF
  330.           RegisterNameParm:
  331.             (verifyFlag: Byte;                                  {set if verify needed}
  332.             filler3: Byte);
  333.           LookupNameParm:
  334.             (retBuffPtr: Ptr;                                   {->return buffer}
  335.             retBuffSize: INTEGER;                               {return buffer size}
  336.             maxToGet: INTEGER;                                  {matches to get}
  337.             numGotten: INTEGER);                                {matched gotten}
  338.           ConfirmNameParm:
  339.             (confirmAddr: AddrBlock;                            {->entity}
  340.             newSocket: Byte;                                    {socket number}
  341.             filler4: Byte));
  342.       SetSelfSendParm:
  343.         (newSelfFlag: Byte;                                     {self-send toggle flag}
  344.         oldSelfFlag: Byte);                                     {previous self-send state}
  345.       KillNBPParm:
  346.         (nKillQEl: Ptr);                                        {ptr to Q element to cancel}
  347.       GetAppleTalkInfoParm:
  348.         (version: INTEGER;                                      {requested info version}
  349.         varsPtr: Ptr;                                           {pointer to well known MPP vars}
  350.         DCEPtr: Ptr;                                            {pointer to MPP DCE}
  351.         portID: INTEGER;                                        {port number [0..7]}
  352.         configuration: LONGINT;                                 {32-bit configuration word}
  353.         selfSend: INTEGER;                                      {non zero if SelfSend enabled}
  354.         netLo: INTEGER;                                         {low value of network range}
  355.         netHi: INTEGER;                                         {high value of network range}
  356.         ourAddr: LONGINT;                                       {our 24-bit AppleTalk address}
  357.         routerAddr: LONGINT;                                    {24-bit address of (last) router}
  358.         numOfPHs: INTEGER;                                      {max. number of protocol handlers}
  359.         numOfSkts: INTEGER;                                     {max. number of static sockets}
  360.         numNBPEs: INTEGER;                                      {max. concurrent NBP requests}
  361.         nTQueue: Ptr;                                           {pointer to registered name queue}
  362.         LAlength: INTEGER;                                      {length in bytes of data link addr}
  363.         linkAddr: Ptr;                                          {data link address returned}
  364.         zoneName: Ptr);                                         {zone name returned}
  365.       ATalkClosePrepParm:
  366.         (appName: Ptr);                                         {pointer to application name in buffer}
  367.     END;
  368.  
  369. ATPPBPtr = ^ATPParamBlock;
  370. ATPParamBlock = PACKED RECORD
  371.     qLink: QElemPtr;                                            {next queue entry}
  372.     qType: INTEGER;                                             {queue type}
  373.     ioTrap: INTEGER;                                            {routine trap}
  374.     ioCmdAddr: Ptr;                                             {routine address}
  375.     ioCompletion: ProcPtr;                                      {completion routine}
  376.     ioResult: OSErr;                                            {result code}
  377.     userData: LONGINT;                                          {ATP user bytes}
  378.     reqTID: INTEGER;                                            {request transaction ID}
  379.     ioRefNum: INTEGER;                                          {driver reference number}
  380.     csCode: INTEGER;                                            {Call command code automatically set}
  381.     atpSocket: Byte;                                            {currBitMap or socket number}
  382.     CASE MPPParmType OF 
  383.         SendRequestParm, SendResponseParm, GetRequestParm, AddResponseParm, KillSendReqParm:
  384.         (atpFlags: Byte;                                        {control information}
  385.         addrBlock: AddrBlock;                                   {source/dest. socket address}
  386.         reqLength: INTEGER;                                     {request/response length}
  387.         reqPointer: Ptr;                                        {-> request/response data}
  388.         bdsPointer: Ptr;                                        {-> response BDS}
  389.         CASE MPPParmType OF
  390.           SendRequestParm:
  391.             (numOfBuffs: Byte;                                  {number of responses expected}
  392.             timeOutVal: Byte;                                   {timeout interval}
  393.             numOfResps: Byte;                                   {number of responses actually received}
  394.             retryCount: Byte;                                   {number of retries}
  395.             intBuff: INTEGER;                                   {used internally for NSendRequest}
  396.             TRelTime: Byte);                                    {TRelease time for extended send request}
  397.           SendResponseParm:
  398.             (filler0: Byte;                                     {numOfBuffs}
  399.             bdsSize: Byte;                                      {number of BDS elements}
  400.             transID: INTEGER);                                  {transaction ID}
  401.           GetRequestParm:
  402.             (bitMap: Byte;                                      {bit map}
  403.             filler1: Byte);
  404.           AddResponseParm:
  405.             (rspNum: Byte;                                      {sequence number}
  406.             filler2: Byte);
  407.           KillSendReqParm:
  408.             (aKillQEl: Ptr));                                   {ptr to Q element to cancel}
  409.     END;
  410.  
  411. XPPPrmBlkType = (XPPPrmBlk,ASPSizeBlk,ASPAbortPrm,XCallParam);
  412.  
  413. XPPSubPrmType = (ASPOpenPrm,ASPSubPrm);
  414.  
  415. XPPEndPrmType = (AFPLoginPrm,ASPEndPrm);
  416.  
  417. XPPParmBlkPtr = ^XPPParamBlock;
  418. XPPParamBlock = PACKED RECORD
  419.     qLink: QElemPtr;                                            {next queue entry}
  420.     qType: INTEGER;                                             {queue type}
  421.     ioTrap: INTEGER;                                            {routine trap}
  422.     ioCmdAddr: Ptr;                                             {routine address}
  423.     ioCompletion: ProcPtr;                                      {completion routine}
  424.     ioResult: OSErr;                                            {result code}
  425.     cmdResult: LONGINT;                                         {command result (ATP user bytes)}
  426.     ioVRefNum: INTEGER;                                         {volume reference or drive number}
  427.     ioRefNum: INTEGER;                                          {driver reference number}
  428.     csCode: INTEGER;                                            {call command code}
  429.     CASE XPPPrmBlkType OF
  430.       ASPAbortPrm:
  431.         (abortSCBPtr: Ptr);                                     {SCB pointer for AbortOS}
  432.       ASPSizeBlk:
  433.         (aspMaxCmdSize: INTEGER;                                {for SPGetParms}
  434.         aspQuantumSize: INTEGER;                                {for SPGetParms}
  435.         numSesss: INTEGER);                                     {for SPGetParms}
  436.       XPPPrmBlk:
  437.         (sessRefnum: INTEGER;                                   {offset to session refnum}
  438.         aspTimeout: Byte;                                       {timeout for ATP}
  439.         aspRetry: Byte;                                         {retry count for ATP}
  440.         CASE XPPSubPrmType OF
  441.           ASPOpenPrm:
  442.             (serverAddr: AddrBlock;                             {server address block}
  443.             scbPointer: Ptr;                                    {SCB pointer}
  444.             attnRoutine: Ptr);                                  {attention routine pointer}
  445.           ASPSubPrm:
  446.             (cbSize: INTEGER;                                   {command block size}
  447.             cbPtr: Ptr;                                         {command block pointer}
  448.             rbSize: INTEGER;                                    {reply buffer size}
  449.             rbPtr: Ptr;                                         {reply buffer pointer}
  450.             CASE XPPEndPrmType OF
  451.               AFPLoginPrm:
  452.                 (afpAddrBlock: AddrBlock;                       {address block in AFP login}
  453.                 afpSCBPtr: Ptr;                                 {SCB pointer in AFP login}
  454.                 afpAttnRoutine: Ptr);                           {Attn routine pointer in AFP login}
  455.               ASPEndPrm:
  456.                 (wdSize: INTEGER;                               {write data size}
  457.                 wdPtr: Ptr;                                     {write data pointer}
  458.                 ccbStart: ARRAY [0..295] OF Byte)));            {afpWrite max size = 296, else 150}
  459.       XCallParam:
  460.         (xppSubCode: INTEGER;
  461.         xppTimeout: Byte;                                       {retry interval (seconds)}
  462.         xppRetry: Byte;                                         {retry count}
  463.         filler1: INTEGER;                                       {word space for rent.  see the super.}
  464.         zipBuffPtr: Ptr;                                        {pointer to buffer (must be 578 bytes)}
  465.         zipNumZones: INTEGER;                                   {no. of zone names in this response}
  466.         zipLastFlag: Byte;                                      {non-zero if no more zones}
  467.         filler2: Byte;                                          {filler}
  468.         zipInfoField: PACKED ARRAY [1..70] OF Byte);            {on initial call, set first word to zero}
  469.     END;
  470.  
  471.  
  472. FUNCTION OpenXPP(VAR xppRefnum: INTEGER): OSErr;
  473. FUNCTION ASPOpenSession(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  474. FUNCTION ASPCloseSession(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  475. FUNCTION ASPAbortOS(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  476. FUNCTION ASPGetParms(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  477. FUNCTION ASPCloseAll(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  478. FUNCTION ASPUserWrite(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  479. FUNCTION ASPUserCommand(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  480. FUNCTION ASPGetStatus(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  481. FUNCTION AFPCommand(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  482. FUNCTION GetLocalZones(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  483. FUNCTION GetZoneList(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  484. FUNCTION GetMyZone(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  485. FUNCTION PAttachPH(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  486. FUNCTION PDetachPH(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  487. FUNCTION PWriteLAP(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  488. FUNCTION POpenSkt(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  489. FUNCTION PCloseSkt(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  490. FUNCTION PWriteDDP(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  491. FUNCTION PRegisterName(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  492. FUNCTION PLookupName(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  493. FUNCTION PConfirmName(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  494. FUNCTION PRemoveName(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  495. FUNCTION PSetSelfSend(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  496. FUNCTION PKillNBP(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  497. FUNCTION PGetAppleTalkInfo(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  498. FUNCTION PATalkClosePrep(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  499. FUNCTION POpenATPSkt(thePBptr: ATPPBPtr;async: BOOLEAN): OSErr;
  500. FUNCTION PCloseATPSkt(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  501. FUNCTION PSendRequest(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  502. FUNCTION PGetRequest(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  503. FUNCTION PSendResponse(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  504. FUNCTION PAddResponse(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  505. FUNCTION PRelTCB(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  506. FUNCTION PRelRspCB(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  507. FUNCTION PNSendRequest(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  508. FUNCTION PKillSendReq(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  509. FUNCTION PKillGetReq(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  510. FUNCTION ATPKillAllGetReq(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  511. PROCEDURE BuildLAPwds(wdsPtr: Ptr;dataPtr: Ptr;destHost: INTEGER;prototype: INTEGER;
  512.     frameLen: INTEGER);
  513. PROCEDURE BuildDDPwds(wdsPtr: Ptr;headerPtr: Ptr;dataPtr: Ptr;netAddr: AddrBlock;
  514.     ddpType: INTEGER;dataLen: INTEGER);
  515. PROCEDURE NBPSetEntity(buffer: Ptr;nbpObject: Str32;nbpType: Str32;nbpZone: Str32);
  516. PROCEDURE NBPSetNTE(ntePtr: Ptr;nbpObject: Str32;nbpType: Str32;nbpZone: Str32;
  517.     socket: INTEGER);
  518. FUNCTION GetBridgeAddress: INTEGER;
  519. FUNCTION BuildBDS(buffPtr: Ptr;bdsPtr: Ptr;buffSize: INTEGER): INTEGER;
  520. FUNCTION MPPOpen: OSErr;
  521. FUNCTION MPPClose: OSErr;
  522. FUNCTION LAPOpenProtocol(theLAPType: ABByte;protoPtr: Ptr): OSErr;
  523. FUNCTION LAPCloseProtocol(theLAPType: ABByte): OSErr;
  524. FUNCTION LAPWrite(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  525. FUNCTION LAPRead(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  526. FUNCTION LAPRdCancel(abRecord: ABRecHandle): OSErr;
  527. FUNCTION LAPAddATQ(theATQEntry: ATQEntryPtr): OSErr;
  528. FUNCTION LAPRmvATQ(theATQEntry: ATQEntryPtr): OSErr;
  529. FUNCTION DDPOpenSocket(VAR theSocket: Byte;sktListener: Ptr): OSErr;
  530. FUNCTION DDPCloseSocket(theSocket: Byte): OSErr;
  531. FUNCTION DDPRead(abRecord: ABRecHandle;retCksumErrs: BOOLEAN;async: BOOLEAN): OSErr;
  532. FUNCTION DDPWrite(abRecord: ABRecHandle;doChecksum: BOOLEAN;async: BOOLEAN): OSErr;
  533. FUNCTION DDPRdCancel(abRecord: ABRecHandle): OSErr;
  534. FUNCTION ATPLoad: OSErr;
  535. FUNCTION ATPUnload: OSErr;
  536. FUNCTION ATPOpenSocket(addrRcvd: AddrBlock;VAR atpSocket: Byte): OSErr;
  537. FUNCTION ATPCloseSocket(atpSocket: Byte): OSErr;
  538. FUNCTION ATPSndRequest(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  539. FUNCTION ATPRequest(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  540. FUNCTION ATPReqCancel(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  541. FUNCTION ATPGetRequest(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  542. FUNCTION ATPSndRsp(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  543. FUNCTION ATPAddRsp(abRecord: ABRecHandle): OSErr;
  544. FUNCTION ATPResponse(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  545. FUNCTION ATPRspCancel(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  546. FUNCTION NBPRegister(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  547. FUNCTION NBPLookup(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  548. FUNCTION NBPExtract(theBuffer: Ptr;numInBuf: INTEGER;whichOne: INTEGER;
  549.     VAR abEntity: EntityName;VAR address: AddrBlock): OSErr;
  550. FUNCTION NBPConfirm(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  551. FUNCTION NBPRemove(abEntity: EntityPtr): OSErr;
  552. FUNCTION NBPLoad: OSErr;
  553. FUNCTION NBPUnload: OSErr;
  554. FUNCTION GetNodeAddress(VAR myNode: INTEGER;VAR myNet: INTEGER): OSErr;
  555. FUNCTION IsMPPOpen: BOOLEAN;
  556. FUNCTION IsATPOpen: BOOLEAN;
  557. PROCEDURE ATEvent(event: LONGINT;infoPtr: Ptr);
  558. FUNCTION ATPreFlightEvent(event: LONGINT;cancel: LONGINT;infoPtr: Ptr): OSErr;
  559.  
  560.  
  561.     { UsingAppleTalk }
  562.  
  563.  
  564.     IMPLEMENTATION
  565. END.
  566.  
  567.  
  568.